Repository navigation
Anomalous abi symbol surface - #35
Merged
Merged
Conversation
Anomalous ADR 0049 records that "Ny has no red-zone-disabling CLI option", and that its userspace red zone "remains intact because interrupt entry uses the separately owned TSS privilege stack". That is their design absorbing a missing option of ours, and it only holds while interrupt entry switches stacks; kernel-reentrant code cannot rely on it. nilassembler --no-red-zone marks every generated definition noredzone. It is deliberately independent of --freestanding rather than implied by it, because the two answer different questions: where the entry is, and whether the 128 bytes below the stack pointer are usable. Forcing it on for every freestanding target would pessimise exactly the configuration ADR 0049 describes as working. The attribute does not survive into an object, so asserting it needed somewhere to look. nilassembler --emit-llvm writes the generated IR, which makes the guarantee checkable instead of asserted, and is useful on its own for seeing what the backend produced. The contract test reads the attribute groups the definitions actually reference rather than grepping for the word, which would also pass if a single function carried it, and it checks the negative case so the flag is shown to be doing the work. Linux: 573 registered, 0 failed, 3 environment skips. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A freestanding object imports exactly five symbols, but the framework shipped no implementation of them: the existing nilruntime is hosted, so every freestanding consumer had to supply the boundary itself or satisfy it with stubs that fail when reached. nilruntime_freestanding supplies it instead. It implements nyrt_abi_version, nyrt_context_begin, nyrt_context_end, nyrt_profile_site and nyrt_fail without libc, a kernel or an allocator, and the built archive imports nothing: only a weak __ny_host_fail, which a host defines to observe a failure and which defaults to stopping the caller rather than returning into a program whose invariants are already broken. What it deliberately does not do is allocate, format, read a clock or touch a device; those remain a host's. nil.freestanding-runtime proves the boundary closes rather than merely compiles. It links the emitted object and the archive with -nostdlib and its own _start, so a hosted toolchain cannot satisfy a symbol by accident -- if either side still needed libc the link fails instead of succeeding quietly on the build host -- then runs the result and requires the process exit status to be the value Ny returned. It also links a program that replaces the weak reporter, since a hook that cannot be overridden would be no use to a host. Linux: 574 registered, 0 failed, 3 environment skips. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Records what the Anomalous ABI is -- rite wire types plus a mailbox and int 0xf3 gate, so struct layout and one interrupt rather than a calling convention -- and why every blocker was NIL-side: ADR 0049 bridged the generated entry with a shim against its observed shape, satisfied unconditional libc imports with fatal trap stubs, and noted Ny has no red-zone option. Also records the boundary. Nothing here shows a vessel booting or issuing a rite; that needs their kernel. What the branch removes is the reason a shim and stubs were necessary. Allocation is named as the next real decision, since a vessel that concatenates a string needs calloc and the freestanding runtime deliberately has none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.